<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of Url
 *
 * @author dejo
 */
class Tc_Helper_MvcUrl extends Zend_Controller_Action_Helper_Abstract {

    protected $_action;

    public function init() {
        $this->_action = $this->getActionController();
        //$controller = $this->_action->getRequest()->getControllerName();
    }

    public function direct() {
        $request = $this->_action->getRequest();
        $controller = $request->getControllerName();
        $action = $request->getActionName();
        $module = $request->getModuleName();

        $url = array(
                'current' => '/'.$module.'/'.$controller.'/'.$action,
                'edit' => '/'.$module.'/'.$controller.'/edit',
                'add' => '/'.$module.'/'.$controller.'/add',
                'delete' => '/'.$module.'/'.$controller.'/delete',
                'password' => '/'.$module.'/'.$controller.'/password',
        );
        return $url;
    }
}
?>
